package com.djx.goods.controller;

import com.djx.common.domain.Type;
import com.djx.common.result.Result;
import com.djx.goods.service.TypeService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/type")
public class TypeController {
    @Resource
    private TypeService typeService;
    @PostMapping("/list")
    private Result<List<Type>> getList(){
        List<Type> list=typeService.getList();
        return Result.success(list);
    }
}
